/*********************************************************************************
 * @name: common functions
 * @description:  Call functions of website
 * @author: (c) XGOON MEDIA VIET NAM (http://xgoon.com - contact@xgoon.com)
 * @version: 1.0
 *********************************************************************************/



/****************************
 ***** Global Namespace *****
 ****************************/
var XGOON = XGOON = XGOON || {
    isLog: true
};

/*************************************
 ***** Main functions start here *****
 *************************************/
jQuery(document).ready(function() {
    with (XGOON)
    {
        initTest();
        
    }
});

//
jQuery(window).load(function() {
});

/******************************
 ***** Show error if have *****
 ******************************/
XGOON.Foo = {
    toAlert: 'test'
};
XGOON.Bar = function(arg)
{
    log(arg);
    
};

function log(msg) {
    if (!XGOON.isLog)
        return false;
    if (typeof (console) != 'undefined') {
        console.log(msg);
    }
}

window.onerror = function(msg, url, linenumber) {
    if (typeof (console) != 'undefined') {
        console.log('Error message: ' + msg + '\nURL: ' + url + '\nLine Number: ' + linenumber);
    }
    return false;
};

/******************************
 ***** Functions built in *****
 ******************************/

XGOON.initTest = function() {
};